package xyz.zhzby.cyzx.acl.convert;

import io.swagger.annotations.ApiModel;
import org.mapstruct.Mapper;
import org.mapstruct.NullValueCheckStrategy;
import org.mapstruct.NullValuePropertyMappingStrategy;
import org.mapstruct.factory.Mappers;
import xyz.zhzby.cyzx.acl.dto.response.RoleResponse;
import xyz.zhzby.cyzx.acl.entity.Role;

import java.util.List;

/**
 * @author zby
 * @date 2021/12/08
 */
@ApiModel("角色相关转换器")
@Mapper(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface RoleConvert {

    RoleConvert INSTANCE = Mappers.getMapper(RoleConvert.class);

    RoleResponse ROLE_RESPONSE(Role role);

    List<RoleResponse> ROLE_RESPONSE_LIST(List<Role> roleList);
}
